@model ZKEACMS.FormGenerator.Models.FormField
@{
    string maxLength = "200";
    Model.Attributes.TryAdd("data-val-length", L("{0}的长度应小于{1}").Text.FormatWith(Model.DisplayName, maxLength));
    Model.Attributes.TryAdd("data-val-length-max", maxLength);
}

@Html.TextBox(Model.ID, Model.Value, Model.Attributes)
<span class="field-validation-valid" data-valmsg-for="@Model.ID" data-valmsg-replace="true"></span>
@if (Model.Description.IsNotNullAndWhiteSpace())
{
    <dl>
        <dd>
            @Model.Description
        </dd>
    </dl>
}